package com.wanxin.car.carmng.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.wanxin.car.util.helper.CodeHelper;

/**
 * 销售车辆
 * @author lqk
 */
@Entity
@Table(name="tSaleCar")
public class Car implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	//1代表黑色，2代表白色，3代表银灰色，4代表深灰色，5代表咖啡色，6代表红色，7代表蓝色，8代表绿色，9代表黄色，10代表橙色，11代表香槟色，12代表紫色，13代表多彩色，14代表其它
	public static final String COLOR_BLACK = "1";
	public static final String COLOR_WHITE = "2";
	public static final String COLOR_SILVERGRAY = "3";
	public static final String COLOR_GRAY = "4";
	public static final String COLOR_COFFEE = "5";
	public static final String COLOR_RED = "6";
	public static final String COLOR_BLUE = "7";
	public static final String COLOR_GREEN = "8";
	public static final String COLOR_YELLOW = "9";
	public static final String COLOR_ORANGE = "10";
	public static final String COLOR_CHAMPAGNE = "11";
	public static final String COLOR_PURPLE = "12";
	public static final String COLOR_MULIT = "13";
	public static final String COLOR_OTHER = "14";
	
	//1代表德系，2代表美系，3代表法系，4代表日系，5代表韩系，6代表其他
	public static final String SERIES_DE = "1";
	public static final String SERIES_US = "2";
	public static final String SERIES_FR = "3";
	public static final String SERIES_JP = "4";
	public static final String SERIES_KR = "5";
	public static final String SERIES_OTHER = "6";
	
	/**全部色彩代码:中文说明*/
	public static final Map<String,String> COLORS = new LinkedHashMap<String, String>();
	
	static{
		COLORS.put(COLOR_BLACK, "黑色");
		COLORS.put(COLOR_WHITE, "白色");
		COLORS.put(COLOR_SILVERGRAY, "银灰色");
		COLORS.put(COLOR_GRAY, "深灰色");
		COLORS.put(COLOR_COFFEE, "咖啡色");
		COLORS.put(COLOR_RED, "红色");
		COLORS.put(COLOR_BLUE, "蓝色");
		COLORS.put(COLOR_GREEN, "绿色");
		COLORS.put(COLOR_YELLOW, "黄色");
		COLORS.put(COLOR_ORANGE, "橙色");
		COLORS.put(COLOR_CHAMPAGNE, "香槟色");
		COLORS.put(COLOR_PURPLE, "紫色");
		COLORS.put(COLOR_MULIT, "多彩色");
		COLORS.put(COLOR_OTHER, "其它颜色");
	}
	

	@Id
	@GeneratedValue(generator="my")
	@GenericGenerator(name="my", strategy="uuid")
	@Column(name="cCarID")
	private String id;

	/**牌照*/
	@Column(name="cCarNumber")
	private String number;

	/**车架号*/
	@Column(name="cCarFrameID")
	private String frameid;

	/**引擎号*/
	@Column(name="cCarEngineID")
	private String engineid;

	/**上牌日期*/
	@Column(name="dNumberDate")
	private Date numberDate;

	/**保险日期*/
	@Column(name="dInsuranceDate")
	private Date insuranceDate;

	/**是否有车船税 1代表有，2代表没有*/
	@Column(name="cIsCarTax")
	private String isCarTax;

	/**验车日期*/
	@Column(name="dCarCheckDate")
	private Date checkDate;

	/**排量*/
	@Column(name="cCarDisplacement")
	private String displacement;

	/**行驶里程*/
	@Column(name="cCarMileage")
	private String mileage;

	/**颜色代码,参考COLOR常量 */
	@Column(name="cCarColor")
	private String color;

	/**配置*/
	@Column(name="cCarConfigure")
	private String configure;

	/**品牌*/
	@Column(name="cCarBrand")
	private String brand;

	/**系列,参考常量SERIES*/
	@Column(name="cCarSeries")
	private String series;

	/** 运输类型 1代表客运，2代表货运*/
	@Column(name="cCarType")
	private String type;

	/**备注*/
	@Column(name="cCarNote")
	private String note;

	/**本主姓名*/
	@Column(name="cSalerName")
	private String salerName;

	/**本主电话*/
	@Column(name="cSalerTel")
	private String salerTel;

	/**本主身份证*/
	@Column(name="cSalerCardID")
	private String salerCardid;

	/**本主地址*/
	@Column(name="cSalerAddr")
	private String salerAddr;

	/**买主姓名*/
	@Column(name="cBuyerName")
	private String buyerName;

	/**买主电话*/
	@Column(name="cBuyerTel")
	private String buyerTel;

	/**买主身份证*/
	@Column(name="cBuyerCardID")
	private String buyerCardid;

	/**买主地址*/
	@Column(name="cBuyerAddr")
	private String buyerAddr;

	/**登记时间*/
	@Column(name="dInputDate")
	private Date inputDate;

	/**销售时间*/
	@Column(name="dCarSaleDate")
	private Date saleDate;

	/**过户时间*/
	@Column(name="dCarTransferDate")
	private Date transferDate;

	/**中介id*/
	@Column(name="cInterID")
	private String interId;

	/**修理厂id*/
	@Column(name="cRepairID")
	private String repairId;

	/**车辆买卖过程备注*/
	@Column(name="cBuySaleNote")
	private String buySaleNote;

	/**买价*/
	@Column(name="dCarCost")
	private BigDecimal cost;

	/**卖价*/
	@Column(name="dCarPrice")
	private BigDecimal price;

	/**中介费*/
	@Column(name="dInterCost")
	private BigDecimal interCost;

	/**配件费用*/
	@Column(name="dAccessoriesCost")
	private BigDecimal accessoriesCost;

	/**维修费用*/
	@Column(name="dRepairCost")
	private BigDecimal repairCost;

	/**过户费*/
	@Column(name="dTransferCost")
	private BigDecimal transferCost;

	
	
	public Car() {
	}

	/**
	 * id
	 */
	public Car( String id ) {
		this.id = id;
	}
	
	


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getFrameid() {
		return frameid;
	}

	public void setFrameid(String frameid) {
		this.frameid = frameid;
	}

	public String getEngineid() {
		return engineid;
	}

	public void setEngineid(String engineid) {
		this.engineid = engineid;
	}

	public Date getNumberDate() {
		return numberDate;
	}

	public void setNumberDate(Date numberDate) {
		this.numberDate = numberDate;
	}

	public Date getInsuranceDate() {
		return insuranceDate;
	}

	public void setInsuranceDate(Date insuranceDate) {
		this.insuranceDate = insuranceDate;
	}

	public String getIsCarTax() {
		return isCarTax;
	}

	public void setIsCarTax(String isCarTax) {
		this.isCarTax = isCarTax;
	}

	public Date getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}

	public String getDisplacement() {
		return displacement;
	}

	public void setDisplacement(String displacement) {
		this.displacement = displacement;
	}

	public String getMileage() {
		return mileage;
	}

	public void setMileage(String mileage) {
		this.mileage = mileage;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getConfigure() {
		return configure;
	}

	public void setConfigure(String configure) {
		this.configure = configure;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getSeries() {
		return series;
	}

	public void setSeries(String series) {
		this.series = series;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getSalerName() {
		return salerName;
	}

	public void setSalerName(String salerName) {
		this.salerName = salerName;
	}

	public String getSalerTel() {
		return salerTel;
	}

	public void setSalerTel(String salerTel) {
		this.salerTel = salerTel;
	}

	public String getSalerCardid() {
		return salerCardid;
	}

	public void setSalerCardid(String salerCardid) {
		this.salerCardid = salerCardid;
	}

	public String getSalerAddr() {
		return salerAddr;
	}

	public void setSalerAddr(String salerAddr) {
		this.salerAddr = salerAddr;
	}

	public String getBuyerName() {
		return buyerName;
	}

	public void setBuyerName(String buyerName) {
		this.buyerName = buyerName;
	}

	public String getBuyerTel() {
		return buyerTel;
	}

	public void setBuyerTel(String buyerTel) {
		this.buyerTel = buyerTel;
	}

	public String getBuyerCardid() {
		return buyerCardid;
	}

	public void setBuyerCardid(String buyerCardid) {
		this.buyerCardid = buyerCardid;
	}

	public String getBuyerAddr() {
		return buyerAddr;
	}

	public void setBuyerAddr(String buyerAddr) {
		this.buyerAddr = buyerAddr;
	}

	public Date getInputDate() {
		return inputDate;
	}

	public void setInputDate(Date inputDate) {
		this.inputDate = inputDate;
	}

	public Date getSaleDate() {
		return saleDate;
	}

	public void setSaleDate(Date saleDate) {
		this.saleDate = saleDate;
	}

	public Date getTransferDate() {
		return transferDate;
	}

	public void setTransferDate(Date transferDate) {
		this.transferDate = transferDate;
	}

	public String getInterId() {
		return interId;
	}

	public void setInterId(String interId) {
		this.interId = interId;
	}

	public String getRepairId() {
		return repairId;
	}

	public void setRepairId(String repairId) {
		this.repairId = repairId;
	}

	public String getBuySaleNote() {
		return buySaleNote;
	}

	public void setBuySaleNote(String buySaleNote) {
		this.buySaleNote = buySaleNote;
	}

	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getInterCost() {
		return interCost;
	}

	public void setInterCost(BigDecimal interCost) {
		this.interCost = interCost;
	}

	public BigDecimal getAccessoriesCost() {
		return accessoriesCost;
	}

	public void setAccessoriesCost(BigDecimal accessoriesCost) {
		this.accessoriesCost = accessoriesCost;
	}

	public BigDecimal getRepairCost() {
		return repairCost;
	}

	public void setRepairCost(BigDecimal repairCost) {
		this.repairCost = repairCost;
	}

	public BigDecimal getTransferCost() {
		return transferCost;
	}

	public void setTransferCost(BigDecimal transferCost) {
		this.transferCost = transferCost;
	}


	public static void main(String[] args) {
//		CodeHelper.printEntity("tSaleCar");
		CodeHelper.printEntityJspList(Car.class, "car");
		System.out.println(1);
	}

}
